import { request } from 'umi';
import type { SitInfoItem } from './API.d';

class U {}

export async function querySitList(
  params: U & { pageSize?: number; current?: number; keyword?: string },
) {
  return request('/parkinglot/sit-info/querySitList', {
    method: 'POST',
    data: params,
  });
}

export async function addSit(params: SitInfoItem) {
  return request('/parkinglot/sit-info/addSit', {
    method: 'POST',
    data: params,
  });
}

export async function removeSit(params: number[]) {
  return request('/parkinglot/sit-info/removeSit', {
    method: 'POST',
    data: params,
  });
}

export async function notAvailableSit(params: number[]) {
  return request('/parkinglot/sit-info/notAvailableSit', {
    method: 'POST',
    data: params,
  });
}

export async function availableSit(params: number[]) {
  return request('/parkinglot/sit-info/availableSit', {
    method: 'POST',
    data: params,
  });
}

export async function updateSit(params: SitInfoItem) {
  return request('/parkinglot/sit-info/updateSit', {
    method: 'POST',
    data: params,
  });
}

export async function usedSit(params: number[]) {
  return request('/parkinglot/sit-info/usedSit', {
    method: 'POST',
    data: params,
  });
}
